package org.mclll.xwangplugin.town.util;

import org.bukkit.entity.Player;
import org.mclll.xwangplugin.town.database.domain.TownPlayerDO;
import org.mclll.xwangplugin.town.database.mapper.manage.TownPlayerManage;
import org.mclll.xwangplugin.town.enums.PlayerTownIdentity;

import java.util.UUID;

public class TownUtil {
    public static boolean hasTown(Player player) {
        UUID uniqueId = player.getUniqueId();
        TownPlayerDO townPlayerDO = TownPlayerManage.selectByUuid(uniqueId.toString());
        return townPlayerDO.getIdentity() != PlayerTownIdentity.GENSHIN;
    }
}
